using SqlSugar;

namespace ZR.Model.System
{
    /// <summary>
    /// 报警配置，数据实体对象
    ///
    /// @author mr.zhao
    /// @date 2024-12-19
    /// </summary>
    [SugarTable("config", "报警配置")]
    [Tenant("0")]
    public class Config
    {
        /// <summary>
        /// 主键id
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public long Id { get; set; }

        /// <summary>
        /// 最大值
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public long? Max { get; set; }

        /// <summary>
        /// 最小值
        /// </summary>
        [SugarColumn(IsNullable = true, DefaultValue = "0")]
        public long? Min { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(IsOnlyIgnoreUpdate = true, IsNullable = true)]
        [JsonProperty(propertyName: "createTime")]
        [ExcelColumn(Format = "yyyy-MM-dd HH:mm:ss")]
        public DateTime Create_time { get; set; } = DateTime.Now;


        /// <summary>
        /// 更新时间
        /// </summary>
        //[JsonIgnore]
        [SugarColumn(IsOnlyIgnoreInsert = true, IsNullable = true)]
        [JsonProperty(propertyName: "updateTime")]
        [ExcelIgnore]
        public DateTime? Update_time { get; set; }
    }
}

